using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using RobotSimulator.Basic;
public class Altimeter : BasicSensor {
    public Rigidbody rb;
    protected override void Start()
    {
        base.Start();
        if (rb == null)
        {
            rb = GetComponentInParent<Rigidbody>();
        }
    }
}
public class CmdGetHeight : CmdGetSensorData
{
    float height;
    protected override string GetData(IEU ieu)
    {
        Altimeter s = (Altimeter)(ieu);
        s.output_data = s.rb.position.y.ToString();
        return base.GetData(ieu);
    }

}
